﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Content;

namespace GE.Objects
{
    public static class MonsterFactory
    {
        static ContentManager content;
        static MonsterLibrary library;

        [ContentSerializerIgnore]
        public static MonsterLibrary Library { get { return library; } }

        public static void Initialize(ContentManager content)
        {
            MonsterFactory.content = content;
            library = content.Load<MonsterLibrary>("MonsterLibrary");


        }

        public static Character getMonster(int index, int kind, Vector2 pos)
        {
            return new Character(
                content.Load<CharacterData>(library.monsters[index].fileNames[kind]),
                pos);
        }
    }
}
